remove alterts, fix bug