alignLine function always returns fasle