initial code with working filtering buttons