slightly better code