added kippt button
updated algo