Added flexible input size