if not a inbuilt method how should to write