fixed multiple problem, and added method input