Added code to handle different phone sizes